package butines.game;

import butines.core.game.Entity;
import butines.core.lqdb.Predicate;

public class Querys {

	private Entity self;
	
	public Querys(Entity self) {
		this.self = self;
	}
	
	public boolean isSameClass(Entity entity) {
		return (entity.getClass() == self.getClass());
	}
	
	public boolean isYourself(Entity entity) {
		return self == entity;
	}
	
	public final Predicate<Entity> findOthers = new Predicate<Entity>() {
		public boolean match(Entity entity) {
			return isSameClass(entity) && !isYourself(entity);
		}		
	};
	
}
